
<!DOCTYPE html>
<html lang="en">

<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta name="description" content="">
	<meta name="author" content="">

	<title>NEWS</title>
	
	<!-- css -->
	<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
	<link href="./assets/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
	<link href="./assets/css1/nivo-lightbox.css" rel="stylesheet" />
	<link href="./assets/css1/nivo-lightbox-theme/default/default.css" rel="stylesheet" type="text/css" />
	<link href="./assets/css1/animations.css" rel="stylesheet" />
	<link href="./assets/css1/style.css" rel="stylesheet">
	<link href="./assets/color/default.css" rel="stylesheet">


</head>

<body id="page-top" data-spy="scroll" data-target=".navbar-custom">
	
	<section class="hero" id="intro">
		<div class="container">
			<div class="row">
				<div class="col-md-12 text-right navicon">
					<a id="nav-toggle" class="nav_slide_button" href="#"><span></span></a>
				</div>
			</div>
			<div class="row">
				<div class="col-md-8 col-md-offset-2 text-center inner">
					<div class="animatedParent">
						<h1 class="animated fadeInDown">DAILY NEWS</h1>
						<p class="animated fadeInUp">Welcome to our studio</p>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-6 col-md-offset-3 text-center">
					<a href="#about" class="learn-more-btn btn-scroll">Learn more</a>
				</div>
			</div>
			<div class="row">
				<div class="col-md-6 col-md-offset-3 text-center"><li data-toggle="modal" data-target="#signin-signup-tab" id="signin-button">
					<a href="#login" class="learn-more-btn btn-scroll">Login or Sign up</a>
				</div>
			</div>

			
		</div>
	</section>
	<div id="signin-signup-tab" class="modal fade">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-body">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">x</button>
					<ul class="nav nav-tabs" role="tablist">
						<li id="signin-li"><a href="#signin-tab" role="tab" data-toggle="tab">Login</a></li>
						<li id="signup-li"><a href="#signup-tab" role="tab" data-toggle="tab">Sign up</a></li>
					</ul>
					

					<div class="tab-content" id="signin-signup-tab">
						<div class="tab-pane" id="signup-tab">
							<form class="form col-md-12 center-block" method="post" action="index.php?c=index&m=adduser" enctype="multipart/form-data">
								
								<div class="form-group">
									<label class="col-md-2 control-label">name</label>
									<input type="text" name="uname" class="form-control" placeholder="Username">
								</div>
								
								<div class="form-group">
									<label class="col-md-2 control-label">password</label>
									<input type="password" name="password" class="form-control" placeholder="Password">
								</div>

								<div class="form-group">
									<label class="col-md-2 control-label">gender</label>
									<input type="radio" name="gender" value="0"checked="">male
									<input type="radio" name="gender" value="1">female
								</div>

								<div class="form-group">
									<label class="col-md-2 col-xs-5 control-label">icon</label>
									<input type="file" name="pic">
								</div>

								<div class="form-group">
									<button class="btn btn-primary btn-lg btn-block">Sign up<button>
									</div>
								</form>
							</div>

							

							<div class="tab-pane" id="signin-tab">
								<form  class="form col-md-12 center-block" method="post" action="index.php?c=index&m=login" enctype="multipart/form-data">
									<div class="form-group">
										<input type="text" name="uname" class="form-control input-lg" placeholder="Username">
									</div>
									<div class="form-group">
										<input type="password" name="password"  class="form-control input-lg" placeholder="Password">
									</div>
									<div class="form-group">
										<button class="btn btn-primary btn-lg btn-block">Come on</button>
										<span><a href="newforgot.html">forget password?</a></span>
									</div>
								</form>

							</div>
						</div>
					</div>
					<div class="modal-footer">
					</div>
				</div>
			</div>
		</div>


		<!-- Navigation -->
		<div id="navigation">
			<nav class="navbar navbar-custom" role="navigation">
				<div class="container">
					<div class="row">
						<div class="col-md-2">
							<div class="site-logo">
								<a href="index.html" class="brand">NEWS</a>
							</div>
						</div>


						<div class="col-md-10">

							<!-- Brand and toggle get grouped for better mobile display -->
							<div class="navbar-header">
								<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
									<i class="fa fa-bars"></i>
								</button>
							</div>
							<!-- Collect the nav links, forms, and other content for toggling -->
							<div class="collapse navbar-collapse" id="menu">
								<ul class="nav navbar-nav navbar-right">
									<li class="active"><a href="">Hi,<?php
										session_start(); 
										if(isset($_SESSION["uname"]))
											echo " ".$_SESSION["uname"]."";
										else{
											echo " ";
										}
										?></a>
									</li>
									<li class="active"><a href="index.php?c=index&m=logout">Logout</a></li>
									<li class="active"><a href="#intro">Home</a></li>
									<li><a href="#about">Newstype</a></li>
									<li><a href="#service">Latest news</a></li>
									<li><a href="#works">Pictures</a></li>	<li><a href="#contact">Comments</a></li>
								</ul>
							</div>
							<!-- /.Navbar-collapse -->

						</div>
					</div>
				</div>
				<!-- /.container -->
			</nav>
		</div> 
		<!-- /Navigation -->  

		<!-- Section: about -->
		<section id="about" class="home-section color-dark bg-white">
			<div class="container marginbot-50">
				<div class="row">
					<div class="col-lg-8 col-lg-offset-2">
						<div class="animatedParent">
							<div class="section-heading text-center animated bounceInDown">
								<h2 class="h-bold">About the newstype</h2>
								<div class="divider-header"></div>
							</div>
						</div>
					</div>
				</div>

			</div>

			<div class="container">


				<div class="row">


					<div class="col-lg-6 col-lg-offset-2 animatedParent">		
						<div class="text-center">
							<div class="navbar-header">
								<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#menu">
									<i class="fa fa-bars"></i>
								</button>
							</div>
							<!-- Collect the nav links, forms, and other content for toggling -->
							<div class="collapse navbar-collapse" id="menu">
								<ul class="nav navbar-nav navbar-right">
									<?php //var_dump($data['newstype']);


									foreach ($data['newstype'] as $row) {
										echo '<li class="active"><a href="index.php?c=detail&m=detail&id='.$row['ntid'].'#social">'.$row['newstype'].'
									</a></li>';
								} ?>
										<!-- <li class="active"><a href="index.php?c=detail&m=detail#social">
											Social</a></li>
											<li><a href="index.php?c=detail&m=detail#entertainment">Entertainment</a></li>
											<li><a href="index.php?c=detail&m=detail&m=detail#military">Military</a></li>
											<li><a href="index.php?c=detail&m=detail#sports">Sports</a></li>	
											<li><a href="index.php?c=detail&m=detail#finance">Finance</a></li> -->
										</ul>
									</div>

									<!-- /.Navbar-collapse -->

								</div>
							</div>
							<a href="#service" class="btn btn-skin btn-scroll">当下最流行的？</a>
						</div>
					</div>


				</div>		
			</div>

		</section>
		<!-- /Section: about -->


		<!-- Section: services -->
		<section id="service" class="home-section color-dark bg-gray">
			<div class="container marginbot-50">
				<div class="row">
					<div class="col-lg-8 col-lg-offset-2">
						<div>
							<div class="section-heading text-center">
								<h2 class="h-bold">The latest news</h2>
								<div class="divider-header"></div>
							</div>
						</div>
					</div>
				</div>

			</div>

			<div class="text-center">
				<div class="container">

					<div class="row animatedParent">
						<div class="col-xs-6 col-sm-4 col-md-4">
							<div class="animated rotateInDownLeft">
								<div class="service-box">
									<div class="service-icon">
										<span class="fa fa-laptop fa-2x"></span> 
									</div>
									<div class="service-desc">						
										<h5>Web Design</h5>
										<div class="divider-header"></div>
										<p>
											王宝强离婚或已获得抚养权 
											马蓉或已分得家产

										</p><a href="index.php?c=show&m=show&nid=18#social" class="btn btn-skin">Learn more</a>
									</div>
								</div>
							</div>
						</div>

						<div class="col-xs-6 col-sm-4 col-md-4">
							<div class="animated rotateInDownLeft slow">
								<div class="service-box">
									<div class="service-icon">
										<span class="fa fa-camera fa-2x"></span> 
									</div>
									<div class="service-desc">
										<h5>Photography</h5>
										<div class="divider-header"></div>
										<p>
											孙杨现身母校成健康大使 傅园慧吴敏霞同台助力

										</p><a href="index.php?c=show&m=show&nid=12#social" class="btn btn-skin">Learn more</a>
									</div>
								</div>
							</div>
						</div>
						

						<div class="col-xs-6 col-sm-4 col-md-4">
							<div class="animated rotateInDownLeft slower">
								<div class="service-box">
									<div class="service-icon">
										<span class="fa fa-code fa-2x"></span> 
									</div>
									<div class="service-desc">
										<h5>Graphic design</h5>
										<div class="divider-header"></div>
										<p>
											暴雨大风袭击辽宁 大树被连根拔起

										</p><a href="index.php?c=show&m=show&nid=6#social" class="btn btn-skin">Learn more</a>
									</div>
								</div>
							</div>
						</div>

					</div>		
				</div>
			</div>
		</section>
		<!-- /Section: services -->


		<!-- Section: works -->
		<section id="works" class="home-section color-dark text-center bg-white">
			<div class="container marginbot-50">
				<div class="row">
					<div class="col-lg-8 col-lg-offset-2">
						<div>
							<div class="animatedParent">
								<div class="section-heading text-center">
									<h2 class="h-bold animated bounceInDown">What the latest pictures</h2>
									<div class="divider-header"></div>
								</div>
							</div>
						</div>
					</div>
				</div>

			</div>

			<div class="container">

				<div class="row animatedParent">
					<div class="col-sm-12 col-md-12 col-lg-12" >

						<div class="row gallery-item">
							<div class="col-md-3 animated fadeInUp">
								<a href="./assets/img/works/1.jpg" title="中国女子花样游泳队" data-lightbox-gallery="gallery1" data-lightbox-hidpi="./assets/img/works/1@2x.jpg">
									<img src="./assets/img/works/1.jpg" class="img-responsive" alt="img">
								</a>
							</div>
							<div class="col-md-3 animated fadeInUp slow">
								<a href="./assets/img/works/2.jpg" title="中国战斗机" data-lightbox-gallery="gallery1" data-lightbox-hidpi="./assets/img/works/1@2x.jpg">
									<img src="./assets/img/works/2.jpg" class="img-responsive" alt="img">
								</a>
							</div>
							<div class="col-md-3 animated fadeInUp slower">
								<a href="./assets/img/works/3.jpg" title="刘亦菲" data-lightbox-gallery="gallery1" data-lightbox-hidpi="img/works/1@2x.jpg">
									<img src="./assets/img/works/3.jpg" class="img-responsive" alt="img">
								</a>
							</div>
							<div class="col-md-3 animated fadeInUp">
								<a href="./assets/img/works/4.jpg" title="ＳＴＡＫ　ＴＲＥＫ" data-lightbox-gallery="gallery1" data-lightbox-hidpi="img/works/1@2x.jpg">
									<img src="./assets/img/works/4.jpg" class="img-responsive" alt="img">
								</a>
							</div>
						</div>

					</div>
				</div>	
			</div>

		</section>
		<!-- /Section: works -->

		<!-- Section: contact -->
		<section id="contact" class="home-section nopadd-bot color-dark bg-gray text-center">
			<div class="container marginbot-50">
				<div class="row">
					<div class="col-lg-8 col-lg-offset-2">
						<div class="animatedParent">
							<div class="section-heading text-center">
								<h2 class="h-bold animated bounceInDown">Welcome your views</h2>
								<div class="divider-header"></div>
							</div>
						</div>
					</div>
				</div>

			</div>

			<div class="container">

			<?php 
			$nid=1;
			
			//var_dump($nid);
			session_start();

			//var_dump( $_SESSION['uid']) ?>
			<div class="form-group">
			 <form  method=post action="index.php?c=index&m=addcomments">
			 	<input type="hidden" name="uid" value="<?php echo $_SESSION['uid']; ?>">
              	<input type="hidden" name="nid" value="<?php echo $nid; ?>">
				<textarea name="comment" id="message"rows="6" cols="100" required="required"
				placeholder="Message"></textarea> 
			</div>						
			<?php if(isset($_SESSION['uname']) && !empty($_SESSION['uname'])){ ?>

			<button type="submit" class="btn btn-skin btn-lg btn-lg" id="btnContactUs">Submit</button>

			<?php } else{?>
				
		<a href="#login" data-toggle="modal" data-target="#login">请登录账号</a>

			<?php } ?>
			
	
				</form>
				</div>
			</div>
		</form>
	</div>
</div>	


</div>
</section>
<!-- /Section: contact -->


<footer>
	<div class="container">
		<div class="row">
			<div class="col-md-6">
				<ul class="footer-menu">
					<li><a href="#">Home</a></li>
					<li><a href="#">Press release</a></li>
				</ul>
			</div>
			<div class="col-md-6 text-right">
				<p>&copy;Copyright 2016 - Quitting wrinkles the soul.by 14002 CST</p>
                    <!-- 
                        All links in the footer should remain intact. 
                        Licenseing information is available at: http://bootstraptaste.com/license/
                        You can buy this theme without footer links online at: http://bootstraptaste.com/buy/?theme=Bocor
                    -->
                </div>
            </div>	
        </div>
    </footer>

    <!-- Core JavaScript Files -->
    <script src="./assets/js/jquery.min.js"></script>	 
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    <script src="./assets/js/jquery.sticky.js"></script>
    <script src="./assets/js/jquery.easing.min.js"></script>	
    <script src="./assets/js/jquery.scrollTo.js"></script>
    <script src="./assets/js/jquery.appear.js"></script>
    <script src="./assets/js/stellar.js"></script>
    <script src="./assets/js/nivo-lightbox.min.js"></script>

    <script src="./assets/js/custom.js"></script>
    <script src="./assets/js/css3-animate-it.js"></script>

</body>

</html>
